package com.coin.liu.Service.Impl;

import com.coin.liu.Mapper.JurisdictionMapper;
import com.coin.liu.Mapper.UserInfoMapper;
import com.coin.liu.Service.UserInfoService;
import com.coin.liu.pojo.userData.Jurisdiction;
import com.coin.liu.pojo.userData.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserInfoServiceImpl implements UserInfoService {
    @Autowired private JurisdictionMapper jurisdictionMapper;
    @Autowired private UserInfoMapper userInfoMapper;
    @Override
    public void addJurisdiction(Jurisdiction jurisdiction) {
        jurisdictionMapper.addJurisdiction(jurisdiction);
    }

    @Override
    public void updateJurisdiction(String value, String id, String field) {
        jurisdictionMapper.updateJurisdiction(value,id,field);
    }

    @Override
    public List<Jurisdiction> findAllJurisdiction() {
        List<Jurisdiction> allJurisdiction = jurisdictionMapper.findAllJurisdiction();
        return allJurisdiction;
    }

    @Override
    public List<UserInfo> findAllUserInfo() {
        List<UserInfo> list= userInfoMapper.findAllUserInfo();
        return list;
    }

    @Override
    public void addUserInfo(Jurisdiction jurisdiction) {
        userInfoMapper.addUserInfo(jurisdiction);
    }

    @Override
    public void updateUserInfo(String value, String id, String field) {
        userInfoMapper.updateUserInfo(value,id, field);
    }
}
